/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.factory.server.bo;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author milos
 */
@Entity
@Table(name = "levenshtein")
public class Levenshtein extends AbstractBusinessObject {

    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @Column(name = "input_id")
    private String inputId;
    @Basic(optional = false)
    @Column(name = "distance")
    private int distance;
    @Basic(optional = false)
    @Column(name = "pattern")
    private String pattern;

    public Levenshtein() {
    }

    public Levenshtein(String inputId, int distance, String pattern) {

        this.inputId = inputId;
        this.distance = distance;
        this.pattern = pattern;
    }

    public String getInputId() {
        return inputId;
    }

    public void setInputId(String inputId) {
        this.inputId = inputId;
    }

    public int getDistance() {
        return distance;
    }

    public void setDistance(short distance) {
        this.distance = distance;
    }

    public String getPattern() {
        return pattern;
    }

    public void setPattern(String pattern) {
        this.pattern = pattern;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Levenshtein)) {
            return false;
        }
        Levenshtein other = (Levenshtein) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.factory.server.bo.Levenshtein[ id=" + id + " ]";
    }
}
